#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include<QThread>
#include<QDebug>
#include<QTcpSocket>
#include<QMetaEnum>
#include"workthread.h"


QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_btnConnect_clicked();
    void showMessage(const QString &info,  bool conn);
    void on_btnSend_clicked();

private:
    Ui::Widget *ui;
    //定义一个线程对象
    WorkThread    thread;
    bool m_connected = false;

};
#endif // MAINWINDOW_H
